package com.zzj.hotel.core.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity(name="room")
public class Room {
	@Id
	@Column(name="roomId")
	private String roomId;

	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
	@JoinColumn(name="typeId")
	private RoomType roomType;

	@Column(name="roomStatus")
	private int roomStatus;

	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
	@JoinColumn(name="resourceId")
	private RoomResource roomResource;

	@Column(name="remarks")
	private String remarks;

	public String getRoomId() {
		return roomId;
	}

	public void setRoomId(String roomId) {
		this.roomId = roomId;
	}

	public RoomType getRoomType() {
		return roomType;
	}

	public void setRoomType(RoomType roomType) {
		this.roomType = roomType;
	}

	public int getRoomStatus() {
		return roomStatus;
	}

	public void setRoomStatus(int roomStatus) {
		this.roomStatus = roomStatus;
	}

	public RoomResource getRoomResource() {
		return roomResource;
	}

	public void setRoomResource(RoomResource roomResource) {
		this.roomResource = roomResource;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	public Room() {
	}

	public Room(String roomId, RoomType roomType, int roomStatus,
			RoomResource roomResource, String remarks) {
		super();
		this.roomId = roomId;
		this.roomType = roomType;
		this.roomStatus = roomStatus;
		this.roomResource = roomResource;
		this.remarks = remarks;
	}


	public static final String ROOMID = "roomId";
	public static final String ROOMTYPE = "roomType";
	public static final String ROOMSTATUS = "roomStatus";
	public static final String RESOURCEId = "resourceId";
	public static final String REMARKS = "remarks";
}
